﻿<%@ Control Language="C#" EnableViewStatE="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<script type="text/javascript">
        function turnDiv(){
            document.getElementById('divUpload').style.display = "none";
            var da = document.getElementsByTagName("a");
            for (var i = 0; i < da.length; i++) {
                if (da[i].innerHTML == "删除") {
                    da[i].innerHTML = " ";
                }
            }
            var td = document.getElementsByTagName("td");
            for (var k = 0; k < td.length; k++) {                
                td[k].onclick = "";
            }
        }
    </script>
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="background-image: url(<%= Antu.Core.Components.SiteSettings.DefaultSiteSettings.DefaultThemeFolderMapPath %>images/menuthb.png);margin-top: 1px">
                <tr>        
                    <td valign="middle" height="30" >
                        <font style="font-size: 14px; font-weight: bold; color: #3E7CC3; float: left;color:black">
                            &nbsp; 附件上传  </font>
                    </td>
                </tr>
            </table>
            
            <%
                if (Page.Request["ise"] == null)
                {
                    %>
                    
                       <div id="divUpload" style="margin-top: 10px; text-align:center;">
            <table cellpadding="0" cellspacing="0" align="center" class="window_tab_list" style="width:98%;margin:20px 0 10px 0;line-height:35px;text-align:center;">
                <tr style="height:30px;">
                    <td>
                        上传附件名称：</td>
                    <td style="width: 80%" align="left">&nbsp;&nbsp;
                        <asp:TextBox ID="filename" runat="server" />(如不填则选择上传的文件名为默认文件名)
                        </td>
                </tr>
                <tr style="height:30px;">
                    <td>
                        附件上传：</td>
                    <td align="left">&nbsp;&nbsp;
                        <asp:FileUpload ID="picFile" runat="server" BorderStyle="Solid" BorderWidth="1px" BorderColor="#CEE3F7" BackColor="#FFFFFF" />(支持jpg,gif,jpeg,bmp,doc,docx,xls格式)
                    </td>
                </tr>
                <tr style="height:30px;">
                    <td>
                        所属类别：
                    </td>
                    <td style="text-align: left;">&nbsp;&nbsp;
                        <asp:DropDownList ID="DropDownList1" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="height:30px;">
                    <td style="text-align: center; height: 30px" colspan="2">
                        <asp:Button ID="upfile" runat="server" Text="上 传" />&nbsp;
                        <asp:Button ID="Button1" runat="server" Text="关 闭" />&nbsp;
                        <span style="color:Red; font-size:12px;">（提示：附件大小必须小于10M！）</span>
                    </td>
                </tr>
            </table>
        </div>
                    
                    <%
                    
                }
               
             %>
     
        <div style="text-align: center; width:100%;">
            <table style="width:100%;">
                <tr>
                    <td>
                    </td>
                </tr>
                <tr>
                <%
                    if (Page.Request["ise"] != null)
                    {
                        
                        %>
                             <td style="height: 21px" align="center">
                        <CBW:CustomGridView ID="CustomGridView1" runat="server" AllowPaging="True" SkinID="List" PageSize="10"
                            CustomSortExpression="" AutoGenerateColumns="false" ShowCmpAndCancel="False" 
                            ShowHideColModel="None" Width="765px" CssClass="window_tab_list" CustomGridViewStyle="text-align: center;" 
                            AllowOnMouseOverEvent="True" AutoGenerateDeleteConfirm="True" CustomGridViewClass="window_tab_list_fst" >
                            <PagerSettings Visible="False" />
                            <Columns>
                                <asp:TemplateField HeaderText="查看" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <a href='../RCManage/RC_showfile.aspx?id=<%#Eval("ID") %>' target="_blank">附件</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="name" HeaderText="资源名称" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                <asp:BoundField DataField="SUFFIX" HeaderText="资源类型" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                            </Columns>
                        </CBW:CustomGridView>
                    </td>
                        <%
                    }
                    else
                    {
                        %>
                        <td style="height: 21px" align="center">
                        <CBW:CustomGridView ID="CustomGridView2" runat="server" AllowPaging="True" SkinID="List" PageSize="10"
                            CustomSortExpression="" AutoGenerateColumns="false" ShowCmpAndCancel="False" 
                            ShowHideColModel="None" Width="765px" CssClass="window_tab_list" CustomGridViewStyle="text-align: center;" 
                            AllowOnMouseOverEvent="True" AutoGenerateDeleteConfirm="True" CustomGridViewClass="window_tab_list_fst" >
                            <PagerSettings Visible="False" />
                            <Columns>
                                <asp:TemplateField HeaderText="查看" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <a href='../RCManage/RC_showfile.aspx?id=<%#Eval("ID") %>' target="_blank">附件</a>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="name" HeaderText="资源名称" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                <asp:BoundField DataField="SUFFIX" HeaderText="资源类型" ItemStyle-HorizontalAlign="Center"></asp:BoundField>
                                <asp:CommandField ShowDeleteButton="True" HeaderText="删除" ItemStyle-HorizontalAlign="Center" />
                            </Columns>
                        </CBW:CustomGridView>
                    </td>
                        
                        <%
                    }
                     %>
                    
                </tr>
            </table>
        </div>